package xjay.ai.emotionalsupport.controller;


import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class PlayController {
    //简单GET请求
    @GetMapping("/hello")
    public String hello() {
        return "Hello World";
    }

    //带路径参数的GET请求
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name) {
        return "Hello " + name;
    }

    //POST请求接受JSON数据
    @PostMapping("/hello/user")
    public ResponseEntity<Map<String, Object>> createUser(@RequestBody SecurityProperties.User user) {
        return null;
    }
}
